// 歌单列表相关接口
import request from '../utils/request'

// 获取 歌单详情 接口
export const getResourceDetailApi = (id: number) => request.post(`/playlist/detail?id=${id}&s=50`)

// 获取 歌单全部歌曲 接口
export const getResourceAllSongsApi = (id: number) => request.post(`/playlist/track/all?id=${id}`)

// 获取 音乐url 接口
export const getMusicUrlApi = (id: number | string, level: string) => request.post(`/song/url?id=${id}&level=${level}`)

export interface ICheckMusic {
	success: Boolean,
	message: string
}
// 验证 音乐是否可用 接口
export const checkMusicApi = (id: number) => request.get<any, ICheckMusic>(`/check/music?id=${id}`)

// 默认搜索关键词 接口
export const defaultSearchKeywordsApi = () => request.get('/search/default')